package com.jiepos.mpos.biz.customer.controller;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import com.jiepos.mpos.biz.customer.service.CustomLoginidChangeService;
import com.jiepos.mpos.common.entity.App_Custom_Loginid_ChangeEntity;
import com.jiepos.mpos.core.controller.BaseController;
import com.jiepos.mpos.core.entity.Pagination;

/**
 * 
 * 会员登录账号变更视图控制类
 * 
 * @ProjectName: [mpos1]
 * @Package com.jiepos.mpos.biz.customer.controller
 * @author 肖志伟
 * @version 1.0
 * @since 2017年9月26日 上午10:45:25
 * @history（历次修订内容、修订人、修订时间等） @UpdateRemark [说明本次修改内容]
 * @Copyright (c) 2017 江苏杰博实信息技术有限公司
 */
@Controller
@RequestMapping("customloginidchange")
public class CustomLoginidChangeController extends BaseController {

	@Autowired
	private CustomLoginidChangeService customLoginidChangeService;

	/**
	 * 进入会员手机号变更界面
	 * 
	 * @param request
	 * @param response
	 * @return
	 */
	@RequestMapping("/getCustomLoginidChangeList.do")
	public ModelAndView getCustomerAccountList(HttpServletRequest request, HttpServletResponse response) {
		ModelAndView model = new ModelAndView("/module/customer/customloginidchange/customloginidchange_list");
		return super.getDetail(request, response, model);
	}

	/**
	 * 查询会员手机号变更json数据
	 * 
	 * @param pagination
	 *            分页对象
	 * @param customLoginidChangeEntity
	 *            页面数据对象
	 * @param name
	 *            会员名称
	 * @return
	 */
	@RequestMapping("/getCustomLoginidChangeListJson.do")
	public @ResponseBody Map getCustomerInfoListJson(HttpServletRequest request, Pagination pagination,
			App_Custom_Loginid_ChangeEntity customLoginidChangeEntity, String name, String custom_no) {
		return customLoginidChangeService.getCustomerAccountList(request, pagination, customLoginidChangeEntity, name, custom_no);
	}

}
